package com.apes.fn.scm.retailOrder.service.tc.tcOutbox;

import com.apes.framework.jpa.DefaultPersistListener;
import com.apes.framework.jpa.Model;
import com.apes.framework.jpa.Name;
import com.apes.framework.jpa.comment.Comment;
import com.apes.framework.jpa.generator.ApesGenerator;
import com.apes.framework.util.ApesConst;
import com.apes.hr.base.model.Employee;
import com.apes.scm.masterdata.frame.model.Dept;
import com.apes.scm.masterdata.party.model.PartyRole;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SelectBeforeUpdate;

import javax.persistence.*;
import java.util.HashSet;
import java.util.Set;

/**
 * 功能：平台外接送车
 *
 * @author linwz
 * @create 2021-03-15 10:00
 */
@Getter
@Setter
@SelectBeforeUpdate
@DynamicInsert
@DynamicUpdate
@Entity
@EntityListeners(DefaultPersistListener.class)
@Table(name = TcOutPickCarItem.CONST_TABLE_NAME)
public class TcOutPickCarItem extends Model {
	public static final String CONST_TABLE_NAME = "tc_out_pick_car_item";

	@Id
	@Column(name="id")
	@ApesGenerator(code = CONST_TABLE_NAME, name = "平台外接送车明细",padding = 9)
	private Integer id;

	@ManyToOne
	@JoinColumn(name = "tc_out_pick_car_id", referencedColumnName="id")
	@Comment("平台外接送车")
	private TcOutPickCar tcOutPickCar;


	@Comment("车牌")
	@Column(name = "plate_number", length = 64)
	private String plateNumber; //车牌号码

	@Comment("对应合作单位")
	@Column(name = "cooperation", length = 64)
	private String cooperation; //对应合作单位

	@Column(name = "pick_up_money", nullable = false, columnDefinition = ApesConst.FIELD_QTY_16_4_0)
	@Comment("接车金额")
	private Double pickUpMoney ;//

	@Column(name = "pick_out_money", nullable = false, columnDefinition = ApesConst.FIELD_QTY_16_4_0)
	@Comment("送车金额")
	private Double pickOutMoney ;//

}
